reflect.Value.typ (method)
107 uses
reflect (current package)
deepequal.go#L42: if !v1.typ().Pointers() {
makefunc.go#L103: fl |= flag(v.typ().Kind())
makefunc.go#L104: rcvr := Value{v.typ(), v.ptr, fl}
map_swiss.go#L148: tt := (*mapType)(unsafe.Pointer(v.typ()))
map_swiss.go#L159: if (tt.Key == stringType || key.kind() == String) && tt.Key == key.typ() && tt.Elem.Size() <= abi.SwissMapMaxElemBytes {
map_swiss.go#L161: e = mapaccess_faststr(v.typ(), v.pointer(), k)
map_swiss.go#L170: e = mapaccess(v.typ(), v.pointer(), k)
map_swiss.go#L212: tt := (*mapType)(unsafe.Pointer(v.typ()))
map_swiss.go#L265: t := (*mapType)(unsafe.Pointer(iter.m.typ()))
map_swiss.go#L290: t := (*mapType)(unsafe.Pointer(iter.m.typ()))
map_swiss.go#L295: key = key.assignTo("reflect.MapIter.SetKey", v.typ(), target)
map_swiss.go#L296: typedmemmove(v.typ(), v.ptr, key.ptr)
map_swiss.go#L309: t := (*mapType)(unsafe.Pointer(iter.m.typ()))
map_swiss.go#L334: t := (*mapType)(unsafe.Pointer(iter.m.typ()))
map_swiss.go#L339: elem = elem.assignTo("reflect.MapIter.SetValue", v.typ(), target)
map_swiss.go#L340: typedmemmove(v.typ(), v.ptr, elem.ptr)
map_swiss.go#L351: t := (*mapType)(unsafe.Pointer(iter.m.typ()))
map_swiss.go#L411: tt := (*mapType)(unsafe.Pointer(v.typ()))
map_swiss.go#L413: if (tt.Key == stringType || key.kind() == String) && tt.Key == key.typ() && tt.Elem.Size() <= abi.SwissMapMaxElemBytes {
map_swiss.go#L415: if elem.typ() == nil {
map_swiss.go#L416: mapdelete_faststr(v.typ(), v.pointer(), k)
map_swiss.go#L427: mapassign_faststr(v.typ(), v.pointer(), k, e)
map_swiss.go#L438: if elem.typ() == nil {
map_swiss.go#L439: mapdelete(v.typ(), v.pointer(), k)
map_swiss.go#L450: mapassign(v.typ(), v.pointer(), k, e)
value.go#L99: func (v Value) typ() *abi.Type {
value.go#L112: if v.typ().Size() != goarch.PtrSize || !v.typ().Pointers() {
value.go#L123: t := v.typ()
value.go#L273: return Value{ptrTo(v.typ()), v.ptr, fl | flag(Pointer)}
value.go#L306: if v.typ().Elem().Kind() != abi.Uint8 {
value.go#L312: if v.typ().Elem().Kind() != abi.Uint8 {
value.go#L319: n := int((*arrayType)(unsafe.Pointer(v.typ())).Len)
value.go#L329: if v.typ().Elem().Kind() != abi.Int32 {
value.go#L387: t := (*funcType)(unsafe.Pointer(v.typ()))
value.go#L777: if v.typ() == nil {
value.go#L874: if v.typ().Kind() == abi.Interface {
value.go#L875: tt := (*interfaceType)(unsafe.Pointer(v.typ()))
value.go#L891: rcvrtype = v.typ()
value.go#L892: ms := v.typ().ExportedMethods()
value.go#L897: if !nameOffFor(v.typ(), m.Name).IsExported() {
value.go#L900: ifn := textOffFor(v.typ(), m.Ifn)
value.go#L902: t = (*funcType)(unsafe.Pointer(typeOffFor(v.typ(), m.Mtyp)))
value.go#L912: t := v.typ()
value.go#L1162: return v.typ().Len()
value.go#L1166: if v.typ().Elem().Kind() == abi.Array {
value.go#L1167: return v.typ().Elem().Len()
value.go#L1180: tt := (*chanType)(unsafe.Pointer(v.typ()))
value.go#L1227: if v.typ().IfaceIndir() {
value.go#L1248: tt := (*ptrType)(unsafe.Pointer(v.typ()))
value.go#L1263: tt := (*structType)(unsafe.Pointer(v.typ()))
value.go#L1299: if v.Kind() == Pointer && v.typ().Elem().Kind() == abi.Struct {
value.go#L1322: if v.Kind() == Ptr && v.typ().Elem().Kind() == abi.Struct {
value.go#L1324: return Value{}, errors.New("reflect: indirection through nil pointer to embedded struct field " + nameFor(v.typ().Elem()))
value.go#L1339: if f, ok := toRType(v.typ()).FieldByName(name); ok {
value.go#L1350: if f, ok := toRType(v.typ()).FieldByNameFunc(match); ok {
value.go#L1386: tt := (*arrayType)(unsafe.Pointer(v.typ()))
value.go#L1409: tt := (*sliceType)(unsafe.Pointer(v.typ()))
value.go#L1553: if typ != v.typ() {
value.go#L1655: typ := (*abi.ArrayType)(unsafe.Pointer(v.typ()))
value.go#L1686: typ := (*abi.StructType)(unsafe.Pointer(v.typ()))
value.go#L1807: typedmemclr(v.typ(), v.ptr)
value.go#L1834: tt := (*arrayType)(unsafe.Pointer(v.typ()))
value.go#L1844: if v.typ().Elem().Kind() == abi.Array {
value.go#L1845: return v.typ().Elem().Len()
value.go#L1873: if v.typ() == nil {
value.go#L1876: if v.flag&flagMethod != 0 || uint(i) >= uint(toRType(v.typ()).NumMethod()) {
value.go#L1879: if v.typ().Kind() == abi.Interface && v.IsNil() {
value.go#L1885: return Value{v.typ(), v.ptr, fl}
value.go#L1894: if v.typ() == nil {
value.go#L1900: return toRType(v.typ()).NumMethod()
value.go#L1913: if v.typ() == nil {
value.go#L1919: m, ok := toRType(v.typ()).MethodByName(name)
value.go#L1930: tt := (*structType)(unsafe.Pointer(v.typ()))
value.go#L1973: bitSize := v.typ().Size() * 8
value.go#L2021: if !v.typ().Pointers() {
value.go#L2072: tt := (*chanType)(unsafe.Pointer(v.typ()))
value.go#L2105: tt := (*chanType)(unsafe.Pointer(v.typ()))
value.go#L2131: x = x.assignTo("reflect.Set", v.typ(), target)
value.go#L2134: typedmemclr(v.typ(), v.ptr)
value.go#L2136: typedmemmove(v.typ(), v.ptr, x.ptr)
value.go#L2157: if toRType(v.typ()).Elem().Kind() != Uint8 { // TODO add Elem method, fix mustBe(Slice) to return slice.
value.go#L2169: if v.typ().Elem().Kind() != abi.Int32 {
value.go#L2311: tt := (*arrayType)(unsafe.Pointer(v.typ()))
value.go#L2317: typ = (*sliceType)(unsafe.Pointer(v.typ()))
value.go#L2331: return Value{v.typ(), unsafe.Pointer(&t), v.flag}
value.go#L2373: tt := (*arrayType)(unsafe.Pointer(v.typ()))
value.go#L2379: typ = (*sliceType)(unsafe.Pointer(v.typ()))
value.go#L2467: return v.typ()
value.go#L2477: typ := v.typ()
value.go#L2479: return v.typ()
value.go#L2485: if v.typ().Kind() == abi.Interface {
value.go#L2545: if v.typ() == nil {
value.go#L2574: if !v.typ().Pointers() {
value.go#L2676: t := v.typ().Elem()
value.go#L2709: st := (*sliceType)(unsafe.Pointer(v.typ()))
value.go#L2712: mapclear(v.typ(), v.pointer())
value.go#L2764: stringCopy = sk == String && dst.typ().Elem().Kind() == abi.Uint8
value.go#L2771: de := dst.typ().Elem()
value.go#L2773: se := src.typ().Elem()
value.go#L2908: tt := (*chanType)(unsafe.Pointer(ch.typ()))
value.go#L2939: tt := (*chanType)(unsafe.Pointer(ch.typ()))
value.go#L3119: case directlyAssignable(dst, v.typ()):
value.go#L3126: case implements(dst, v.typ()):
value.go#L3146: panic(context + ": value of type " + stringFor(v.typ()) + " is not assignable to type " + stringFor(dst))
value.go#L3156: op := convertOp(t.common(), v.typ())
value.go#L3158: panic("reflect.Value.Convert: value of type " + stringFor(v.typ()) + " cannot be converted to type " + t.String())